import { get, post } from './request'

export async function getCabinet(serial) {
  return get(`/v1/cabinet_view2/?serial=${serial}&towards=1`).then((res) => res && res.data)
}

export async function getRack(id) {
  return get(`/v1/equipment_view_info/${id}?towards=0`).then((res) => res && res.data)
}

export async function getWebParkcabinetCount(id) {
  return get(`/v1/park/getWebParkCabinetCount?id=${id}`).then((res) => res && res.data)
}

export async function getRoom(serial) {
  return get(`/v1/room/statistics?serial=${serial}&room_id=1`).then((res) => res && res.data)
}
